import Vue from 'vue'
import App from './App.vue'
import router from './router'
import common from './utils/common'
import storage from './utils/storage'
import axios from './utils/axios'

import layoutBase from '@/pages/layout/base'
import Crumb from '@/components/navigation/crumb'
import Pannel from '@/components/layout/pannel'
import avatar from '@/components/view/avatar'
import zTable from '@/components/view/table'
import Pages from '@/components/navigation/pages'
import LoadingModal from '@/components/feedback/loading/load-modal'
Vue.component('layout-base', layoutBase)
Vue.component('crumb', Crumb)
Vue.component('pannel', Pannel)
Vue.component('avatar', avatar)
Vue.component('z-table', zTable)
Vue.component('pages', Pages)
Vue.component('loading-modal', LoadingModal)

import Message from '@/components/feedback/message/message'
Vue.prototype.$Message = Message.install
import Confirm from '@/components/feedback/modal/confirm/index'
Vue.prototype.$Confirm = Confirm.install
import Lightbox from '@/components/modal/lightbox/index'
Vue.prototype.$Lightbox = Lightbox.install

// markdown 编辑器
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
Vue.use(mavonEditor)

Vue.config.productionTip = false
Vue.prototype.$global = {}
Vue.prototype.$common = common
Vue.prototype.$storage = storage
Vue.prototype.$http = axios

new Vue({
  router,
	render: h => h(App)
}).$mount('#app')
